<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>登录</title>
 	<link href="check.css" rel="stylesheet" type="text/css">  
	<script type="text/javascript" src="load.js">
	</script>
</head>

<body οnlοad="load_greeting()">
	<table>   
		<tr >
          <td>email:</td>
          <td><input type="email" name="email" id="email" size="20" onChange='check(this.id)'></td>
          <td id="emailCheck" class="check" hidden="true">电子邮件名非法！</td>
        </tr>	  
        <tr>
          <td>密码:</td>
          <td><input type="password" name="apassword" id="apassword" size="20" onChange='check("apassword")'></td>
          <td id="apasswordCheck" class="check" hidden="true">密码长度至少8位</td>
        </tr>
    </table>
	  
	<form id="registerForm" align="left" action="http://www.localdomain.com/api/user/login/email/pwd" method="get">
      <input type="submit" id = "submit">
	  <input type="reset" id = "reset">
    </form>
	
	<script>
		
		 var submitBtn = document.getElementById("submit");
		 submitBtn.onclick = function (event) {
			let emailValue = document.querySelector("#email").value;
			let pwdValue = document.querySelector("#apassword").value;
			registerForm.action='/api/user/login/'+emailValue+'/'+pwdValue
			return true;
		 };
		 
    </script>
</body>
</html>
